package net.guerlab.credits.creditsoption.entity;

import java.io.Serializable;

/**
 * 积分设置项
 * 
 * @author guer
 *
 */
public class CreditsOption implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 积分ID
     */
    private Integer creditId;

    /**
     * 积分名称
     */
    private String creditName;

    /**
     * 获取积分ID
     * 
     * @return 积分ID
     */
    public final Integer getCreditId() {
        return creditId;
    }

    /**
     * 设置积分ID
     * 
     * @param creditId
     *            积分ID
     */
    public final void setCreditId(Integer creditId) {
        this.creditId = creditId;
    }

    /**
     * 获取积分名称
     * 
     * @return 积分名称
     */
    public final String getCreditName() {
        return creditName;
    }

    /**
     * 设置积分名称
     * 
     * @param creditName
     *            积分名称
     */
    public final void setCreditName(String creditName) {
        this.creditName = creditName;
    }

    @Override
    public String toString() {
        return "CreditsName [creditId=" + creditId + ", creditName=" + creditName + "]";
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((creditId == null) ? 0 : creditId.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        CreditsOption other = (CreditsOption) obj;
        if (creditId == null) {
            if (other.creditId != null) {
                return false;
            }
        } else if (!creditId.equals(other.creditId)) {
            return false;
        }
        return true;
    }
}
